﻿#pragma once

#include <QTcpServer>
#include <QDebug>
#include <qlist.h>
#include "MyTcpSocket.h"

class MyTcpServer : public QTcpServer
{
	Q_OBJECT
public:
	MyTcpServer();
	static MyTcpServer& getInstance();
	void incomingConnection(qintptr socketDescriptor);
	void reSend(const char* perName, PDU* pdu);

public slots:
	//槽函数形参必须和信号形参一致
	void deleteSocket(MyTcpSocket* pTcpSocket);

private:
	QList<MyTcpSocket*> m_tcpSocketList;
};

